#pragma once
#include <windows.h>

enum WE_COMMANDS
{
	CMD_WE_CMD_START = 0x7FFFFFF,
	CMD_WE_I_CLICK,		 //WPARAM *CWceUiLayer, clicked layer 
	CMD_WE_I_MOVED,
};

//global functions
namespace wceui
{
	//nCurFrame:	current frame, start by 0
	//nFrameCount:	total frame
	//nStotal:		total displacement
	//return value: current displacement when frame is nCurFrame
	extern int CalcAnidisplacement(int nCurFrame, int nFrameCount, int nStotal);
}

//is char ch in string pStr?
BOOL IsCharInStr(TCHAR ch, LPCTSTR pStr);

//convert a rect string to CRect
//for example: string: x, y, w, h to rc(x, y, x + w, y + h)
BOOL ConvertRectStrToRect(LPCTSTR pRectStr, CRect &rc);

BOOL WEWinExec(LPCWSTR pExeFile);

void WEGetExePath(TCHAR* pExePath);